package com.gome.base;

import com.gome.vue4j.core.AbstractVue4jComponent;
import com.gome.vue4j.core.FXMLPath;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.collections.FXCollections;
import javafx.fxml.FXML;

import java.util.List;

/**
 *
 */
@FXMLPath("/base/l3z1-view.fxml")
public class L3Z1StyleClassComponent extends AbstractVue4jComponent {
    @FXML
    StringProperty message = new SimpleStringProperty("类型绑定");

    @FXML
    List<String> classList = FXCollections.observableArrayList();

    @FXML
    public void setRed(){
        String red = "red";
        if(!classList.contains(red)){
            classList.add(red);
        }else {
            classList.remove(red);
        }
    }

    @FXML
    public void yellowBackground(){
        String red = "yellowBackground";
        if(!classList.contains(red)){
            classList.add(red);
        }else {
            classList.remove(red);
        }
    }
    @FXML
    public void setBorder(){
        String red = "redBorder";
        if(!classList.contains(red)){
            classList.add(red);
        }else {
            classList.remove(red);
        }
    }

}
